Work Log
A Work Log Entry represents a single run-through of a guide. This is used with the data-entry feature to record timing information on guide completions. For metadata about the step forms into which data is entered, see the Step Forms section.
GET /work_log
List of work log entries. See GET /work_log/{entryid} for a description of the work_data field.
GET /work_log/{entryid}
Get all information about an entry with a known entryid. Work data is presented as a list of values keyed on field_revisionid from Step Forms. In the example below, the field with field_revisionid '123' has received input from the user of string 'example', and the field with field_revisionid '124' has received input of a checked checkbox. Note that all output will be as strings, regardless of input type. Boolean values from checkboxes will be converted to '1' or '0'. current_timing is the entry's open timing row as {timingid, stepid, date_start}; its stepid is null while the entry is paused, and current_timing itself is null when there is no open row (the entry is complete, or it was started without a step and no step has been timed yet). handoff_stepid is the stepid the entry was on when its current handoff was recorded (suspend or assume), or null when the entry has no handoff. In the example below the entry is complete, so current_timing is null; a running entry would return e.g. {"timingid": 123, "stepid": 346, "date_start": 1367452660}.
POST /work_log
Create a new entry with the current logged in userid and a given guideid, and workorderid. The work_data field is included for consistency, though it will always be empty upon creation.
POST /work_log/{entryid}/finish
Set the endtime of an entry to the current time, marking the entry as complete. The guide_revisionid represents the current version of the guide. If this value changes, it means the guide has been edited.
POST /work_log/{entryid}/cancel
Set the endtime of an in progress entry to the current time, marking the entry as cancelled.
POST /work_log/{entryid}/pause
Pause the timing on an entry. Whatever step was active before will become inactive, and pause time will start counting up.
POST /work_log/{entryid}/resume
Resume a paused entry. The previous step that was active will resume.
PUT /work_log/{entryid}/stepData
Save data from a step form for a specific work log entry.
DELETE /work_log/{entryid}
Delete a work log entry and all associated data.
GET /work_log/{guideid}/suspended
Get the suspended work log sessions for the specified guide, ordered by start time, oldest first. Requires the feature-work-order-handoffs setting, and the caller must be able to assume work log entries on the guide.
GET /work_log/{guideid}/sessions
Get the current user's unfinished work log sessions for the specified guide, ordered by start time, oldest first. Includes sessions the user started that have not been suspended, and sessions the user has assumed from another user.
POST /work_log/{entryid}/suspend
Suspend an in progress work order. Suspended work orders can be assumed by another user.
POST /work_log/{entryid}/assume
Assume a suspended work order. Caller must be able to view the guide.